package com.neusoft.databus.core.service;

import java.util.List;
import java.util.Map;

import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;

import com.neusoft.bizcore.web.support.Searchable;
import com.neusoft.databus.common.dto.MonitorDataDTO;

/**
 * @author naxiang
 */
public interface MonitorDataService {

    List<MonitorDataDTO> search(String resourceCode, final Searchable searchable);

    Page<MonitorDataDTO> search(final Pageable pageable, final Searchable searchable);

    /**
     * {"collectedTime":"xxx","data":[{"name":"","code":"POSITIVE_ACTIVE_POWER",
     * "value": 7837.0}]}
     *
     * @param resourceCode
     * @return
     */
    Map<String, Object> findInCache(String resourceCode);

    Map<String, List<Map<String, Object>>> search(List<String> resourceCodes, long startTime, long endTime);

    long countOfDay(String resourceCode, int day);

}
